<?php

namespace App\Wxapp\Controllers;

use App\Store\Models\Account\SiteStore;
use App\Store\Models\Order\OrderSales;
use App\Store\Models\Order\OrderSalesGoods;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;

/**
 * 门店列表
 */
class StoreController extends BaseController
{
    /**
     * 查询门店列表
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function storeList(Request $request)
    {
        $cpId = $this->cp_id;
        $data=[];
        if($cpId>0){
            $data = SiteStore::query()
                ->where('cp_id',$cpId)
                ->where('is_del',1)
                ->orderBy('id','desc')
                ->get()
                ->toArray();
        }

        return response()->json(['code' => '000', 'msg' => '获取成功', 'data' => $data]);
    }


}
